public class Ball extends AnimObj {
	double xSpeed;
	double ySpeed;
	//----------------------------------------------------
	Ball( String name, int walkFrames, int a1Frames, int a2Frames ){
		super(name, walkFrames, a1Frames, a2Frames );
		xSpeed = 0;
		ySpeed = 0;
	}
	//----------------------------------------------------
	public void setSpeeds(float speedX,float speedY){
		xSpeed = speedX;
		ySpeed = speedY;
	}
	//----------------------------------------------------
	public void play(long t){
		double 	g = 1000d;	
		double time = (double)t/1000;
		x = (float) (time*xSpeed + x);
		y = (float) (y - ySpeed*time + g*time*time/2);		
		ySpeed = ySpeed - g*time;	
		//System.out.println(x + "    " + y + "     " + ySpeed);
	}
}

